<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>v-model 结合下拉列表使用</title>
</head>
<body>
<div id="app">
    <select name="fruits" id="fruits" v-model="fruit" multiple>
        <option value="苹果">苹果</option>
        <option value="香蕉">香蕉</option>
        <option value="橘子">橘子</option>
        <option value="西瓜">西瓜</option>
        <option value="草莓">草莓</option>
    </select>
    <label for="fruits"></label>


    <div>你选中的水果是: <span>{{ fruit }}</span></div>
</div>

<script type="module">
    import {createApp, ref} from "../../../js/vue.esm-browser.js";

    let app = createApp(
        {
            setup() {
                let fruit = ref([])
                return {
                    fruit
                }
            }
        }
    );

    app.mount("#app")
</script>
</body>
</html>